package com.jbit.examSystem.dao;

import com.jbit.examSystem.pojo.Student;
import com.jbit.examSystem.pojo.Teacher;
import com.jbit.examSystem.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface TeacherDao {
    void add(Teacher teacher);

    Teacher checkEmail(String email);

    Teacher loginByNameAndPassword(@Param("name") String name, @Param("password") String password);

    void setLoginTime(@Param("loginTime")Date loginTime,
                      @Param("id") Integer id,
                      @Param("lastLoginTime") Date lastLoginTime);

    void updateInfo(User user);

    Teacher getByName(String name);

    void updatePwd(User user);

    Teacher selectById(Integer id);

    List<Teacher> selectAll();

    List<User> getAllTeacher(@Param("userName") String userName);
}
